<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>GeorgeLib: GeorgeLib::vec2 Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">GeorgeLib
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>GeorgeLib</b></li><li class="navelem"><a class="el" href="class_george_lib_1_1vec2.html">vec2</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_george_lib_1_1vec2-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">GeorgeLib::vec2 Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Holds 2 values and does vector maths.  
 <a href="class_george_lib_1_1vec2.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="vec2_8h_source.html">vec2.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa72f7f6df698e34035edfcfdc6eae836"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa72f7f6df698e34035edfcfdc6eae836"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#aa72f7f6df698e34035edfcfdc6eae836">vec2</a> (void)</td></tr>
<tr class="memdesc:aa72f7f6df698e34035edfcfdc6eae836"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor : an empty vector, (0,0) <br/></td></tr>
<tr class="separator:aa72f7f6df698e34035edfcfdc6eae836"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44e9ac449d0dc5bd47136f8ccffa8a4c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a44e9ac449d0dc5bd47136f8ccffa8a4c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a44e9ac449d0dc5bd47136f8ccffa8a4c">vec2</a> (float X, float Y)</td></tr>
<tr class="memdesc:a44e9ac449d0dc5bd47136f8ccffa8a4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor : from three values, (x,y) <br/></td></tr>
<tr class="separator:a44e9ac449d0dc5bd47136f8ccffa8a4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a173288c04bc3afb95c304df1bb5a1140"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a173288c04bc3afb95c304df1bb5a1140">vec2</a> (float a)</td></tr>
<tr class="memdesc:a173288c04bc3afb95c304df1bb5a1140"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor : from one value, (a,a,a)  <a href="#a173288c04bc3afb95c304df1bb5a1140">More...</a><br/></td></tr>
<tr class="separator:a173288c04bc3afb95c304df1bb5a1140"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b0191cddcfddafc0139071b6c03928a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a3b0191cddcfddafc0139071b6c03928a">vec2</a> (float *v)</td></tr>
<tr class="memdesc:a3b0191cddcfddafc0139071b6c03928a"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor : from an array of float[2]  <a href="#a3b0191cddcfddafc0139071b6c03928a">More...</a><br/></td></tr>
<tr class="separator:a3b0191cddcfddafc0139071b6c03928a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7096ee9f35743553b83237e626f5763"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af7096ee9f35743553b83237e626f5763"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#af7096ee9f35743553b83237e626f5763">vec2</a> (const <a class="el" href="class_george_lib_1_1vec2.html">vec2</a> &amp;v)</td></tr>
<tr class="memdesc:af7096ee9f35743553b83237e626f5763"><td class="mdescLeft">&#160;</td><td class="mdescRight">copy constructor : from another vector <br/></td></tr>
<tr class="separator:af7096ee9f35743553b83237e626f5763"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1eac06fd2c02819808abeaaba95c9429"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1eac06fd2c02819808abeaaba95c9429"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a1eac06fd2c02819808abeaaba95c9429">~vec2</a> (void)</td></tr>
<tr class="memdesc:a1eac06fd2c02819808abeaaba95c9429"><td class="mdescLeft">&#160;</td><td class="mdescRight">destructor <br/></td></tr>
<tr class="separator:a1eac06fd2c02819808abeaaba95c9429"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5528ca7e41347e584f7c4e40d8fee65e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5528ca7e41347e584f7c4e40d8fee65e"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a5528ca7e41347e584f7c4e40d8fee65e">total</a> (void)</td></tr>
<tr class="memdesc:a5528ca7e41347e584f7c4e40d8fee65e"><td class="mdescLeft">&#160;</td><td class="mdescRight">addition of all the values of the vector <br/></td></tr>
<tr class="separator:a5528ca7e41347e584f7c4e40d8fee65e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3829ac7172622c994fe1eca8a521f4bd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3829ac7172622c994fe1eca8a521f4bd"></a>
<a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a3829ac7172622c994fe1eca8a521f4bd">negated</a> (void)</td></tr>
<tr class="memdesc:a3829ac7172622c994fe1eca8a521f4bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">negative of this vector <br/></td></tr>
<tr class="separator:a3829ac7172622c994fe1eca8a521f4bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b6a0d64b260d6ac1a583126dcfe4508"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a5b6a0d64b260d6ac1a583126dcfe4508">asArray</a> (float *arr)</td></tr>
<tr class="memdesc:a5b6a0d64b260d6ac1a583126dcfe4508"><td class="mdescLeft">&#160;</td><td class="mdescRight">values of this vector to an array  <a href="#a5b6a0d64b260d6ac1a583126dcfe4508">More...</a><br/></td></tr>
<tr class="separator:a5b6a0d64b260d6ac1a583126dcfe4508"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71a31ad1c4de5953c4fc81bddc77a3e0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a71a31ad1c4de5953c4fc81bddc77a3e0"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a71a31ad1c4de5953c4fc81bddc77a3e0">magnitude</a> (void)</td></tr>
<tr class="memdesc:a71a31ad1c4de5953c4fc81bddc77a3e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">magnitude of this vector <br/></td></tr>
<tr class="separator:a71a31ad1c4de5953c4fc81bddc77a3e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5889db00f69df868032911217a3272dc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5889db00f69df868032911217a3272dc"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a5889db00f69df868032911217a3272dc">magnitudeSqr</a> (void)</td></tr>
<tr class="memdesc:a5889db00f69df868032911217a3272dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">magnitude squared of this vector <br/></td></tr>
<tr class="separator:a5889db00f69df868032911217a3272dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab176a1375109729ea6fcf200a8cd8a3c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab176a1375109729ea6fcf200a8cd8a3c"></a>
<a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#ab176a1375109729ea6fcf200a8cd8a3c">normal</a> (void)</td></tr>
<tr class="memdesc:ab176a1375109729ea6fcf200a8cd8a3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">unit vector of this vector <br/></td></tr>
<tr class="separator:ab176a1375109729ea6fcf200a8cd8a3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab1fd8edb77c1031f8956a70eebaca2d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aab1fd8edb77c1031f8956a70eebaca2d"></a>
<a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#aab1fd8edb77c1031f8956a70eebaca2d">direction</a> (void)</td></tr>
<tr class="memdesc:aab1fd8edb77c1031f8956a70eebaca2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">angles between (1,1) and this vector on each axis in degrees <br/></td></tr>
<tr class="separator:aab1fd8edb77c1031f8956a70eebaca2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b5f45ebe1f97c3e9e0ea21ca9135209"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1b5f45ebe1f97c3e9e0ea21ca9135209"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a1b5f45ebe1f97c3e9e0ea21ca9135209">distancebetween</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:a1b5f45ebe1f97c3e9e0ea21ca9135209"><td class="mdescLeft">&#160;</td><td class="mdescRight">distance between this vector and v <br/></td></tr>
<tr class="separator:a1b5f45ebe1f97c3e9e0ea21ca9135209"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f4f78fb040b19fd244ea07b9ed1f2df"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7f4f78fb040b19fd244ea07b9ed1f2df"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a7f4f78fb040b19fd244ea07b9ed1f2df">anglebetween</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:a7f4f78fb040b19fd244ea07b9ed1f2df"><td class="mdescLeft">&#160;</td><td class="mdescRight">angle between this vector and v <br/></td></tr>
<tr class="separator:a7f4f78fb040b19fd244ea07b9ed1f2df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa09c47b7a3b1d7b74bb8ffa75eca3d06"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa09c47b7a3b1d7b74bb8ffa75eca3d06"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#aa09c47b7a3b1d7b74bb8ffa75eca3d06">dotproduct</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:aa09c47b7a3b1d7b74bb8ffa75eca3d06"><td class="mdescLeft">&#160;</td><td class="mdescRight">dot product between this vector and v <br/></td></tr>
<tr class="separator:aa09c47b7a3b1d7b74bb8ffa75eca3d06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ba3038e24ddc08d2289298e722c9be3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a6ba3038e24ddc08d2289298e722c9be3">rotateabout</a> (float angle, <a class="el" href="class_george_lib_1_1vec2.html">vec2</a> axis)</td></tr>
<tr class="memdesc:a6ba3038e24ddc08d2289298e722c9be3"><td class="mdescLeft">&#160;</td><td class="mdescRight">rotate this vector about an arbitrary axis  <a href="#a6ba3038e24ddc08d2289298e722c9be3">More...</a><br/></td></tr>
<tr class="separator:a6ba3038e24ddc08d2289298e722c9be3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91fdbcf4919aa368ce84f89a01e8d4a6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91fdbcf4919aa368ce84f89a01e8d4a6"></a>
<a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a91fdbcf4919aa368ce84f89a01e8d4a6">operator+</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:a91fdbcf4919aa368ce84f89a01e8d4a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">add vector v to this vector <br/></td></tr>
<tr class="separator:a91fdbcf4919aa368ce84f89a01e8d4a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa725dc4d74e300091fc57404cd89adaf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa725dc4d74e300091fc57404cd89adaf"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#aa725dc4d74e300091fc57404cd89adaf">operator+=</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:aa725dc4d74e300091fc57404cd89adaf"><td class="mdescLeft">&#160;</td><td class="mdescRight">add vector v to this vector <br/></td></tr>
<tr class="separator:aa725dc4d74e300091fc57404cd89adaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e630cf3ec68107efdc1cb27876af94d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e630cf3ec68107efdc1cb27876af94d"></a>
<a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a3e630cf3ec68107efdc1cb27876af94d">operator-</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:a3e630cf3ec68107efdc1cb27876af94d"><td class="mdescLeft">&#160;</td><td class="mdescRight">subtract vector v from this vector <br/></td></tr>
<tr class="separator:a3e630cf3ec68107efdc1cb27876af94d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab39c0ef209daadbe1fadf814925471ee"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab39c0ef209daadbe1fadf814925471ee"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#ab39c0ef209daadbe1fadf814925471ee">operator-=</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:ab39c0ef209daadbe1fadf814925471ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">subtract vector v from this vector <br/></td></tr>
<tr class="separator:ab39c0ef209daadbe1fadf814925471ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a130df5c60bae9ea9de247a11975ae80c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a130df5c60bae9ea9de247a11975ae80c"></a>
<a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a130df5c60bae9ea9de247a11975ae80c">operator*</a> (float f)</td></tr>
<tr class="memdesc:a130df5c60bae9ea9de247a11975ae80c"><td class="mdescLeft">&#160;</td><td class="mdescRight">multiply the values in this vector by f <br/></td></tr>
<tr class="separator:a130df5c60bae9ea9de247a11975ae80c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92cb91305af93b53164d7adf56ac540c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a92cb91305af93b53164d7adf56ac540c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a92cb91305af93b53164d7adf56ac540c">operator*=</a> (float f)</td></tr>
<tr class="memdesc:a92cb91305af93b53164d7adf56ac540c"><td class="mdescLeft">&#160;</td><td class="mdescRight">multiply the values in this vector by f <br/></td></tr>
<tr class="separator:a92cb91305af93b53164d7adf56ac540c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70e7b78e8af4daec3a3536354945d0c2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a70e7b78e8af4daec3a3536354945d0c2"></a>
<a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a70e7b78e8af4daec3a3536354945d0c2">operator/</a> (float f)</td></tr>
<tr class="memdesc:a70e7b78e8af4daec3a3536354945d0c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">divide the values in this vector by f <br/></td></tr>
<tr class="separator:a70e7b78e8af4daec3a3536354945d0c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfc12d333e2b7b7e8dc058cbdf23b45c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acfc12d333e2b7b7e8dc058cbdf23b45c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#acfc12d333e2b7b7e8dc058cbdf23b45c">operator/=</a> (float f)</td></tr>
<tr class="memdesc:acfc12d333e2b7b7e8dc058cbdf23b45c"><td class="mdescLeft">&#160;</td><td class="mdescRight">divide the values in this vector by f <br/></td></tr>
<tr class="separator:acfc12d333e2b7b7e8dc058cbdf23b45c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac00353ab16934d3ba38b04ffbfc6a75e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac00353ab16934d3ba38b04ffbfc6a75e"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#ac00353ab16934d3ba38b04ffbfc6a75e">operator*</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:ac00353ab16934d3ba38b04ffbfc6a75e"><td class="mdescLeft">&#160;</td><td class="mdescRight">perform a dot product between this vector and vector v <br/></td></tr>
<tr class="separator:ac00353ab16934d3ba38b04ffbfc6a75e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe1fee3f6a2eec4074318ed1249099f4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe1fee3f6a2eec4074318ed1249099f4"></a>
<a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#afe1fee3f6a2eec4074318ed1249099f4">operator^</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:afe1fee3f6a2eec4074318ed1249099f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">perform a cross product between this vector and vector v <br/></td></tr>
<tr class="separator:afe1fee3f6a2eec4074318ed1249099f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a673f809afe02b10e957847a7cb8d959f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a673f809afe02b10e957847a7cb8d959f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a673f809afe02b10e957847a7cb8d959f">operator==</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:a673f809afe02b10e957847a7cb8d959f"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if vector is equal to another vector <br/></td></tr>
<tr class="separator:a673f809afe02b10e957847a7cb8d959f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa271d83b4576e9cc15c264edc11a596"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afa271d83b4576e9cc15c264edc11a596"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#afa271d83b4576e9cc15c264edc11a596">operator!=</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:afa271d83b4576e9cc15c264edc11a596"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if vector is not equal to another vector <br/></td></tr>
<tr class="separator:afa271d83b4576e9cc15c264edc11a596"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2bd4f7f8dfac3308afd65bd9abb2a6b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2bd4f7f8dfac3308afd65bd9abb2a6b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#aa2bd4f7f8dfac3308afd65bd9abb2a6b">operator&gt;</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:aa2bd4f7f8dfac3308afd65bd9abb2a6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if vector magnitude is more than another vector's magnitude <br/></td></tr>
<tr class="separator:aa2bd4f7f8dfac3308afd65bd9abb2a6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37be4c10d6d8f7c0a1915be0c37a10cc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37be4c10d6d8f7c0a1915be0c37a10cc"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a37be4c10d6d8f7c0a1915be0c37a10cc">operator&gt;=</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:a37be4c10d6d8f7c0a1915be0c37a10cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if vector magnitude is more than or equal to another vector's magnitude <br/></td></tr>
<tr class="separator:a37be4c10d6d8f7c0a1915be0c37a10cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a366414624657aee5b294bd8a429e4d6f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a366414624657aee5b294bd8a429e4d6f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a366414624657aee5b294bd8a429e4d6f">operator&lt;</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:a366414624657aee5b294bd8a429e4d6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if vector magnitude is less than another vector's magnitude <br/></td></tr>
<tr class="separator:a366414624657aee5b294bd8a429e4d6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64bc2d88e763e0cf9139401c9d7467b2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a64bc2d88e763e0cf9139401c9d7467b2"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a64bc2d88e763e0cf9139401c9d7467b2">operator&lt;=</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:a64bc2d88e763e0cf9139401c9d7467b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if vector magnitude is less than or equal to another vector's magnitude <br/></td></tr>
<tr class="separator:a64bc2d88e763e0cf9139401c9d7467b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94013826e60a3290d567f93df7a77e4a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a94013826e60a3290d567f93df7a77e4a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a94013826e60a3290d567f93df7a77e4a">operator()</a> (float X, float Y)</td></tr>
<tr class="memdesc:a94013826e60a3290d567f93df7a77e4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">change the values of this vector with 2 values using operator() <br/></td></tr>
<tr class="separator:a94013826e60a3290d567f93df7a77e4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7abeeb82c82f68ad03c01caa2516ec2e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7abeeb82c82f68ad03c01caa2516ec2e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a7abeeb82c82f68ad03c01caa2516ec2e">operator()</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:a7abeeb82c82f68ad03c01caa2516ec2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">change the values of this vector with another vector using operator() <br/></td></tr>
<tr class="separator:a7abeeb82c82f68ad03c01caa2516ec2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad85606b7739801626188c6b01a136a2d"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#ad85606b7739801626188c6b01a136a2d">operator[]</a> (int a)</td></tr>
<tr class="memdesc:ad85606b7739801626188c6b01a136a2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">get values using [] operator  <a href="#ad85606b7739801626188c6b01a136a2d">More...</a><br/></td></tr>
<tr class="separator:ad85606b7739801626188c6b01a136a2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a11a6816c127091d096232fa13b1032c3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a11a6816c127091d096232fa13b1032c3"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a11a6816c127091d096232fa13b1032c3">x</a></td></tr>
<tr class="memdesc:a11a6816c127091d096232fa13b1032c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">value on the x-axis <br/></td></tr>
<tr class="separator:a11a6816c127091d096232fa13b1032c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d8f429c6a95016efaf92bdcd7479a10"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d8f429c6a95016efaf92bdcd7479a10"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a8d8f429c6a95016efaf92bdcd7479a10">y</a></td></tr>
<tr class="memdesc:a8d8f429c6a95016efaf92bdcd7479a10"><td class="mdescLeft">&#160;</td><td class="mdescRight">value on the y-axis <br/></td></tr>
<tr class="separator:a8d8f429c6a95016efaf92bdcd7479a10"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:aa625dd2863bb0c8c2a8e1143fb6f2b84"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa625dd2863bb0c8c2a8e1143fb6f2b84"></a>
<a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#aa625dd2863bb0c8c2a8e1143fb6f2b84">operator-</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:aa625dd2863bb0c8c2a8e1143fb6f2b84"><td class="mdescLeft">&#160;</td><td class="mdescRight">negative value of vector <br/></td></tr>
<tr class="separator:aa625dd2863bb0c8c2a8e1143fb6f2b84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a423721485bc58bbd87f25262fc5748b7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a423721485bc58bbd87f25262fc5748b7"></a>
ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#a423721485bc58bbd87f25262fc5748b7">operator&lt;&lt;</a> (ostream &amp;os, <a class="el" href="class_george_lib_1_1vec2.html">vec2</a> &amp;v)</td></tr>
<tr class="memdesc:a423721485bc58bbd87f25262fc5748b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">output vector contents to console <br/></td></tr>
<tr class="separator:a423721485bc58bbd87f25262fc5748b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3464776bbfadca445f9b8694ed5fd4b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_george_lib_1_1vec2.html#ae3464776bbfadca445f9b8694ed5fd4b">detectzero</a> (<a class="el" href="class_george_lib_1_1vec2.html">vec2</a> v)</td></tr>
<tr class="memdesc:ae3464776bbfadca445f9b8694ed5fd4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">round up numbers to 5 digits after the decimal point  <a href="#ae3464776bbfadca445f9b8694ed5fd4b">More...</a><br/></td></tr>
<tr class="separator:ae3464776bbfadca445f9b8694ed5fd4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Holds 2 values and does vector maths. </p>
<p>Contains values for the a 2D vector, has functions for vector calculations, and various other operator overloads. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a173288c04bc3afb95c304df1bb5a1140"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GeorgeLib::vec2::vec2 </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>constructor : from one value, (a,a,a) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>a floating point value to fill the vector </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3b0191cddcfddafc0139071b6c03928a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GeorgeLib::vec2::vec2 </td>
          <td>(</td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>constructor : from an array of float[2] </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">v</td><td>an float array of 2 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5b6a0d64b260d6ac1a583126dcfe4508"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GeorgeLib::vec2::asArray </td>
          <td>(</td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>arr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>values of this vector to an array </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">arr</td><td>an array to copy values to </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad85606b7739801626188c6b01a136a2d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float GeorgeLib::vec2::operator[] </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get values using [] operator </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>a integral value from 0 to 1; </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the <code>x</code> value if <code>a</code> is 0, and the <code>y</code> value if <code>a</code> is 1 </dd></dl>

</div>
</div>
<a class="anchor" id="a6ba3038e24ddc08d2289298e722c9be3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_george_lib_1_1vec2.html">vec2</a> GeorgeLib::vec2::rotateabout </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td>
          <td class="paramname"><em>axis</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>rotate this vector about an arbitrary axis </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">angle</td><td>the amount in degrees to rotate the vector </td></tr>
    <tr><td class="paramname">axis</td><td>the axis in which to rotate the vector around </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="ae3464776bbfadca445f9b8694ed5fd4b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_george_lib_1_1vec2.html">vec2</a> detectzero </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_george_lib_1_1vec2.html">vec2</a>&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>round up numbers to 5 digits after the decimal point </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">v</td><td>the vector that is to be rounded off </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the rounded off vector </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>C:/Users/morbidintel/Desktop/GeorgeLib/GeorgeLib/include/<a class="el" href="vec2_8h_source.html">vec2.h</a></li>
<li>C:/Users/morbidintel/Desktop/GeorgeLib/GeorgeLib/src/vec2.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 21 2015 13:43:18 for GeorgeLib by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
